from django.db import models

# Create your models here.


class MerchantInfo(models.Model):
    """商家表"""
    class Meta:
        db_table = 'merchant'

    name = models.CharField(verbose_name="用户名", max_length=50)
    describe = models.CharField(verbose_name="介绍", max_length=1024, null=True, blank=True)
    address = models.CharField(verbose_name="地址", max_length=512, null=True, blank=True)
    tel = models.CharField(verbose_name="电话", max_length=11, null=True, blank=True)
    master = models.ForeignKey('userManage.Loginuser', verbose_name='店主', on_delete=models.SET_NULL, null=True, blank=True)
    # path = models.CharField(verbose_name="图片路径", max_length=1024, null=True, blank=True)
#     img = models.ManyToManyField('MerchantImg')
#
# class MerchantImg(models.Model):
#     """
#     商家图片
#     """
#     class Meta:
#         db_table = 'merchantImg'
#
#     path = models.CharField(verbose_name="图片路径", max_length=1024)





